//
//  AOP_UIViewController.m
//  lhpc_manager
//
//  Created by 赵永杰 on 2017/9/6.
//  Copyright © 2017年 zhaoyongjie. All rights reserved.
//

#import "AOP_UIViewController.h"
#import <Aspects/Aspects.h>


@implementation AOP_UIViewController

+ (void)load {
    
    [UIViewController aspect_hookSelector:@selector(viewDidLoad) withOptions:0 usingBlock:^(id<AspectInfo> aspectInfo) {
        UIViewController *vc = aspectInfo.instance;
        if (vc.navigationController) {
            [vc.navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];
            [vc.navigationController.navigationBar setShadowImage:[UIImage new]];
        }
        if (vc.navigationController.viewControllers.count > 1) {
            vc.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"v2_icon_login_back"] style:UIBarButtonItemStyleDone target:vc action:@selector(dismiss)];
        }
    }error:NULL];
    
}

@end
